#ifndef PACKET_H
#define PACKET_H

#include "qbitarray.h"
#include <QChar>

#define SIZE_DATA 3

#define COMMAND 0
#define DATA1 1
#define DATA2 2

class Packet
{
public:
    Packet(char com, char d1, char d2 = '\n');
    ~Packet();

    void initPacket(char com, char d1, char d2);
    char * toCharArray();

    char command();
    char data1();
    char data2();


private:
    char _packet[SIZE_DATA];
};



#endif // PACKET_H

